home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16591 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.0 KB  |  40 lines

  1. Path: mail2news.demon.co.uk!txwang
  2. From: Wang TianXing <gztxwang@public1.guangzhou.gd.cn>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Headers containing 'class' as name in typedefinition.
  5. Date: Thu, 11 Apr 1996 13:03:53 GMT
  6. Message-ID: <199604111303.VAA11099@public1.guangzhou.gd.cn>
  7. X-NNTP-Posting-Host: txwang
  8. X-Newsreader: Forte Free Agent 1.0.82
  9. X-Mail2News-Path: public1.guangzhou.gd.cn!txwang
  10.  
  11. On Wed, 10 Apr 1996 22:12:33 +0200, Mattias Arbin
  12. <d2arbin@dtek.chalmers.se> wrote:
  13.  
  14. | I have a problem with a header file when programming with X. The file,
  15. | Raster.h included in the package Xew, contains a typedef with a name
  16. | containing 'class'. Which options do I have if I still wanna keep the
  17. | rest of the program in C++. Is it possible to separate compile the
  18. | functions using the header in question? 
  19.  
  20. | Very greatful for answer.
  21. | --
  22.  
  23.  
  24. 1. replace all occurences of 'class' in raster.h with SomeThingElse.
  25.  
  26. 2. Or, use raster.h in this way:
  27.  
  28. extern "C" {
  29. #define class SomeThingElse
  30. #include <raster.h>
  31. #undef SomeThingElse
  32. };
  33.  
  34. Hope this helps.
  35.  
  36. ---
  37. Wang TianXing
  38.  
  39.  
  40.